<c:set var='view' value='/summary' scope='session' />
<!-- BEGIN CONTEINER -->
  <div id="main">
    <div id="title">
      <div class="left"><fmt:message key='summary'/></div>
      <div class="sp"></div>
    </div>
    <div id="table">
      <div class="head">
        <ul>
          <li class="preview"><fmt:message key='imageC'/></li>
          <li class="title"><fmt:message key='nameC'/></li>
          <li class="price"><fmt:message key='priceC'/></li>
          <li class="price"><fmt:message key='remiseC'/></li>
          <li class="price"><fmt:message key='pricerC'/></li>
          <li class="quantity"><fmt:message key='quantityC'/></li>
          <li class="total"><fmt:message key='totalC'/></li>
        </ul>
        <div class="sp"></div>
      </div>
      <div class="rows sp">
       <c:if test="${usercart.numberOfItems ne 0}">
       <c:forEach var="item" items="${usercart.items}" varStatus="iter">
       ${(((iter.index) % 2) == 0) ? '<div class="row">' : '<div class="row li2">'}   
          <ul>
            <li class="preview"> <a HREF="<c:url value='/product?${item.product.idproduit}'/>"><img SRC="${initParam.productImagePath}${item.product.image}" height="55" border="0" alt="${item.name}"/></a> </li>
            <li class="title"><a href="<c:url value='/product?${item.product.idproduit}'/>">${item.name}</a></li>
            <li class="price">${item.product.prix}&euro;</li>
            <li class="price">${item.product.remise}</li>
            <li class="price"><fmt:formatNumber value="${item.product.prix*(100-item.product.remise)/100}" pattern="0.00"/>&euro;</li>
            <li class="quantity">
              <div class="topsum">${item.quantity}</div>
            </li>
            <li class="total">${item.totalremise}&euro;</li>
          </ul>
          <div class="sp"></div>
        </div>
        </c:forEach>  
       </c:if>
      <c:if test="${usercart.numberOfItems == 0}">
          <div class="row" align="center">
          <fmt:message key='noitemsoncart'/>
          </div>
      </c:if>
      </div>
    </div>
  
    <div id="total"> <span class="value"><fmt:formatNumber value="${(usercart.totalremise < 80) ? (usercart.totalremise+24.9) : usercart.totalremise}" pattern="0.00"/>&euro;</span>
        <span class="label"><fmt:message key='totalC'/></span>
        <c:if test="${usercart.totalremise < 80}">
            <span class="label"><fmt:message key='shippingCosts'/> 5&euro;</span>
            <span class="label"><fmt:message key='taxes'/> ${usercart.totalremise}&euro;</span>
        </c:if>
        
        
    </div>
    <div class="sp"></div>
    <div id="buttons">
        
        
        <c:if test="${empty clientloged }">
             
            <div align="center">
                <div id="pt"><fmt:message key='mustlogin'/></div>
                <c:if test="${not empty param.error}">
                    <div id="error">
                        <c:if test="${param.error == 1}">
                            <p><fmt:message key='logorpass'/></p>
                        </c:if>				
                    </div>
                </c:if>
                <ul>
                    <form id="form1" method="post" action="<c:url value='/loginpan'/>">
                        <li class="last"><label for="inputtext1"><fmt:message key='user'/></label> <input id="inputtext1" type="text" name="user" value="" /> 
                        <label for="inputtext2"><fmt:message key='pass'/></label> <input id="inputtext2" type="password" name="password" value="" /> 
                        <input id="inputsubmit1" type="submit" name="inputsubmit1" value="<fmt:message key='connection'/>" />
                        </li>                  
                    </form>
                </ul>
             </div>
    </c:if>
        
        <c:if test="${not empty clientloged }">
        <a href="<c:url value='/payment'/>" id="checkout"><fmt:message key='confirm'/></a>
        <a href="<c:url value='/'/>" class="button"><fmt:message key='continue'/></a>
        </div>
    </c:if>
</div>
</div>
<!-- END CONTENT -->
